﻿'*******************************************************************************************
'* Copyright Brügmann Software GmbH, Papenburg
'* Author: Björn Kremer
'* Contact: codeplex<at>patorg.de
'* 
'* VB.CMIS is a VB.NET implementation of the Content Management Interoperability Services (CMIS) standard
'*
'* This file is part of VB.CMIS.
'* 
'* VB.CMIS is free software: you can redistribute it and/or modify
'* it under the terms of the GNU Lesser General Public License as published by
'* the Free Software Foundation, either version 3 of the License, or
'* (at your option) any later version.
'* 
'* VB.CMIS is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'* GNU Lesser General Public License for more details.
'* 
'* You should have received a copy of the GNU Lesser General Public License
'* along with VB.CMIS. If not, see <http://www.gnu.org/licenses/>.
'*******************************************************************************************
Namespace Constants
   Public Class ServiceURIs
#Region "Service Document"
      Public Const GetServiceDocument As String = "/servicedoc"
      Public Const GetServiceDocumentById As String = "/{repositoryId}/servicedoc"
#End Region

#Region "Folder Children Collection"
      Public Const GetChildrenBase As String = "/{repositoryId}/children/"
      Public Const GetChildrenBase1 As String = GetChildrenBase & "?id={id}"
      Public Const GetChildren As String = GetChildrenBase1 & "&filter={filter}&includeRelationships={includeRelationships}&renditionFilter={renditionFilter}&includePathSegment={includePathSegment}&includeAllowableActions={includeAllowableActions}&maxItems={maxItems}&skipCount={skipCount}&orderBy={orderBy}"
      Public Const CreateOrMoveObject As String = GetChildrenBase1 & "&sourceFolderId={sourceFolderId}&versioningState={versioningState}"
#End Region

#Region "Types Children Collection"
      Public Const GetTypeChildrenBase As String = "/{repositoryId}/types/"
      Public Const GetTypeChildrenBase1 As String = GetTypeChildrenBase & "?typeId={id}"
      Public Const GetTypeChildren As String = GetTypeChildrenBase1 & "&includePropertyDefinitions={includePropertyDefinitions}&maxItems={maxItems}&skipCount={skipCount}"
#End Region

#Region "Type Entry"
      Public Const GetTypeDefinition As String = "/{repositoryId}/type/?id={id}"
#End Region

#Region "CMIS Specific Link Relations"
      Public Const GetAllowableActions As String = "/{repositoryId}/allowableactions/?id={id}"
#End Region

#Region "ACL Resource"
      Public Const GetAcl As String = "/{repositoryId}/acl/?id={id}"

      Public Const ApplyACL As String = GetAcl & "&aclPropagation={aclPropagation}"
#End Region

#Region "Policies Collection"
      Public Const GetAppliedPoliciesBase As String = "/{repositoryId}/policies/?id={id}"
      Public Const GetAppliedPolicies As String = GetAppliedPoliciesBase & "&filter={filter}"
      Public Const ApplyPolicy As String = GetAppliedPoliciesBase
      Public Const RemovePolicy As String = GetAppliedPoliciesBase

#End Region

#Region "Object Parents Feed"
      Public Const GetObjectParentsBase As String = "/{repositoryId}/objectparents/?objectId={id}"
      Public Const GetObjectParents As String = GetObjectParentsBase & "&filter={filter}&includeRelationships={includeRelationships}&renditionFilter={renditionFilter}&includeAllowableActions={includeAllowableActions}&includeRelativePathSegment={includeRelativePathSegment}"
#End Region

#Region "Content Stream"
      Public Const GetContentStreamBase As String = "/{repositoryId}/content/?id={id}"
      Public Const GetContentStream As String = GetContentStreamBase & "&streamId={streamId}"

      Public Const SetContentStream As String = GetContentStreamBase & "&overwriteFlag={overwriteFlag}"

      Public Const DeleteContentStream As String = GetContentStreamBase
#End Region

#Region "Folder Tree"
      Public Const GetFolderTreeBase As String = "/{repositoryId}/foldertree/"
      Public Const GetFolderTreeBase1 As String = GetFolderTreeBase & "?id={id}"
      Public Const GetFolderTree As String = GetFolderTreeBase1 & "&filter={filter}&depth={depth}&includeAllowableActions={includeAllowableActions}&includeRelationships={includeRelationships}&renditionFilter={renditionFilter}"
#End Region

#Region "Folder Descendants"
      Public Const GetDescendantsBase As String = "/{repositoryId}/descendants/"
      Public Const GetDescendantsBase1 As String = GetDescendantsBase & "?id={id}"
      Public Const GetDescendants As String = GetDescendantsBase1 & "&filter={filter}&depth={depth}&includeAllowableActions={includeAllowableActions}&includeRelationships={includeRelationships}&renditionFilter={renditionFilter}&includePathSegment={includePathSegment}"

      Public Const DeleteTree As String = GetDescendantsBase1 & "&allVersions={allVersions}&continueOnFailure={continueOnFailure}&unfileObjects={unfileObjects}"
#End Region

#Region "Type Descendants"
      Public Const GetTypeDescendantsBase As String = "/{repositoryId}/typedescendants/"
      Public Const GetTypeDescendantsBase1 As String = GetTypeDescendantsBase & "?id={id}"
      Public Const GetTypeDescendants As String = GetTypeDescendantsBase1 & "&depth={depth}&includePropertyDefinitions={includePropertyDefinitions}"
#End Region

#Region "Relationships Collection"
      Public Const GetObjectRelationshipsBase As String = "/{repositoryId}/relationships/?id={id}"
      Public Const GetObjectRelationships As String = GetObjectRelationshipsBase & "&typeId={typeId}&includeSubRelationshipTypes={includeSubRelationshipTypes}&relationshipDirection={relationshipDirection}&maxItems={maxItems}&skipCount={skipCount}&filter={filter}&includeAllowableActions={includeAllowableActions}"

      Public Const CreateRelationship As String = GetObjectRelationshipsBase
#End Region

#Region "Object By Path"
      Public Const GetObjectByPath As String = "/{repositoryId}/objectbypath/?path={path}&filter={filter}&includeAllowableActions={includeAllowableActions}&includeRelationships={includeRelationships}&includePolicyIds={includePolicyIds}&includeACL={includeACL}&renditionFilter={renditionFilter}"
#End Region

#Region "AllVersions Feed"
      Public Const GetAllVersionsBase As String = "/{repositoryId}/allversions/?id={id}"
      Public Const GetAllVersions As String = GetAllVersionsBase & "&filter={filter}&includeAllowableActions={includeAllowableActions}"
      Public Const DeleteAllVersions As String = GetAllVersionsBase
#End Region

#Region "GetObject"
      Public Const GetObjectBase As String = "/{repositoryId}/object/?id={id}"
      Public Const GetObjectBase1 As String = GetObjectBase & "&returnVersion={returnVersion}"
      Public Const GetObjectBase2 As String = GetObjectBase & "&pwc={pwc}"
      Public Const GetObjectBase3 As String = GetObjectBase & "&filter={filter}&includeRelationships={includeRelationships}&renditionFilter={renditionFilter}&includeAllowableActions={includeAllowableActions}&includePolicyIds={includePolicyIds}&includeACL={includeAcl}"

      Public Const GetObject As String = GetObjectBase3 & "&returnVersion={returnVersion}&pwc={pwc}"


      Public Const DeleteObject As String = GetObjectBase & "&allVersions={allVersions}"

      Public Const UpdateProperties As String = GetObjectBase & "&major={major}&checkin={checkin}&checkinComment={checkinComment}"
#End Region

#Region "Checked Out Collection"
      Public Const GetCheckedoutDocsBase As String = "/{repositoryId}/checkedout/"
      Public Const GetCheckedoutDocs As String = GetCheckedoutDocsBase & "?filter={filter}&folderId={id}&maxItems={maxItems}&skipCount={skipCount}&renditionFilter={renditionFilter}&includeAllowableActions={includeAllowableActions}&includeRelationships={includeRelationships}"

      Public Const CheckOut As String = GetCheckedoutDocsBase
#End Region

#Region "Changes"
      Public Const GetContentChangesBase As String = "/{repositoryId}/changes/"
      Public Const GetContentChanges As String = GetContentChangesBase & "?filter={filter}&maxItems={maxItems}&includeACL={includeACL}&includePolicyIds={includePolicyIds}&includeProperties={includeProperties}&changeLogToken={changeLogToken}"
#End Region

#Region "Query"
      Public Const QueryBase As String = "/{repositoryId}/query/"
      Public Const Query As String = QueryBase & "?q={q}&searchAllVersions={searchAllVersions}&includeAllowableActions={includeAllowableActions}&includeRelationships={includeRelationships}&maxItems={maxItems}&skipCount={skipCount}"
#End Region

#Region "Unfiled Collection"
      Public Const GetUnfiled As String = "/{repositoryId}/unfiled/"
      Public Const RemoveObjectFromFolderBase As String = GetUnfiled
      Public Const RemoveObjectFromFolder As String = RemoveObjectFromFolderBase & "?removeFrom={removeFrom}"
#End Region

   End Class
End Namespace